
Pod::Spec.new do |s|

 s.name         = "MAKPay"
 s.version      = "1.0.3"
 s.summary      = "MAK 开发包中支付模块"
 s.homepage     = 'https://gitee.com/z_mark'
 s.license      = { :type => 'Copyright', :text => 'Copyright © 2017年 mark.' }
 s.author             = { "mark" => "zhuwenhui5566@163.com" }
 s.ios.deployment_target = '8.0'  
 s.source       = { :git => "https://gitee.com/z_mark/MAKPay.git", :tag => "#{s.version}" }

# s.dependency 'WechatOpenSDK'
  s.requires_arc = true

  #设置 podspec 的默认 subspec
  s.default_subspec = 'core'

  #主要 subspec
  s.subspec 'core' do |c|
    c.source_files  = "Classes/core/**/*.{h,m}"
    c.dependency 'MAKCommon'
    c.dependency 'Aspects'
  end

 # #功能1，引入则开启
 # s.subspec 'IPayNow' do |ipn|
 #   ipn.dependency 'MAKPay/core'
 #   ipn.source_files  = 'Classes/Ipaynow/**/*.{h,m}'
 # end

  #ipaynow
  s.subspec 'IPayNowAll' do |ipna|
   ipna.dependency 'MAKPay/core'
   ipna.source_files  = 'Classes/Ipaynow/*.{h,m}'
   ipna.public_header_files = "Classes/Ipaynow/*.h"
   ipna.vendored_libraries = "Classes/Ipaynow/iphone+simulator/*.a"
   ipna.ios.frameworks = 'SystemConfiguration', 'CoreMotion','CFNetwork','CoreTelephony','CoreGraphics','QuartzCore','CoreText'
   ipna.ios.libraries = 'z','c++','sqlite3.0','c++', 'stdc++'
   ipna.vendored_frameworks = 'Classes/Ipaynow/AliPayPlugin/AlipaySDK.framework'
   ipna.resource = 'Classes/Ipaynow/AliPayPlugin/AlipaySDK.bundle'
   ipna.xcconfig = { 'OTHER_LDFLAGS' => '-ObjC' }
  end

  #Alipay
  s.subspec 'Alipay' do |alipay|
    alipay.dependency 'MAKPay/core'
    alipay.source_files  = 'Classes/Alipay/**/*.{h,m}'
    alipay.preserve_paths = 'Classes/Alipay/libcrypto.a/','Classes/Alipay/libssl.a'
    alipay.ios.vendored_libraries = 'Classes/Alipay/libcrypto.a/','Classes/Alipay/libssl.a'
    alipay.vendored_frameworks = 'Classes/Alipay/openssl.framework','Classes/Alipay/AlipaySDK.framework'
    alipay.ios.frameworks = 'SystemConfiguration', 'CoreMotion','CFNetwork','CoreTelephony','CoreGraphics','QuartzCore','CoreText'
    alipay.ios.libraries = 'z','c++'
  end  

 

end

#删除 s.ios.deployment_target = '6.0' 会出现 fatal error: 'UIKit/UIKit.h' file not found